<?php

$this->pageTitle = 'Visual overview of publications';
$this->pageSummary = sprintf(
	'A visual overview of publications authored by \'%s\'.
	<p><em>Explanation:</em> This page shows a visual overview of all the publications in the ST Publications database next to the publications written in DBLP (if this person is found in the DBLP dataset).</p>',
	$this->author
);
$this->navigationMenu()->addDefaultItems();
$this->actionBar()->addAction('Back to publications of '. $this->author, sprintf($this->baseUrl('/page/author/%s/'), $this->author));
$this->actionBar()->addAction('World map of publications', sprintf($this->baseUrl('/page/author/worldmap/%s/'), $this->author));
$this->actionBar()->addAction('Topics of author', sprintf($this->baseUrl('/page/author/topics/%s/'), $this->author));
$this->actionBar()->addAction('Visualization of co authors', sprintf($this->baseUrl('/page/author/coauthors/%s/'), $this->author));

$this->navigation()->findById('author_index')->setLabel($this->author);
$this->navigation()->findById('author_index')->setParams(array('queryparam'=>$this->author));

?>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
  google.load('visualization', '1', {'packages':['motionchart']});
  google.setOnLoadCallback(drawChart);
  function drawChart() {
	var data = new google.visualization.DataTable();
	data.addColumn('string', 'Papers');
	data.addColumn('number', 'Date');
	data.addColumn('number', 'Amount');
	data.addRows([
	<?php	
	$total = count($this->dates);
	$i = 0;	
	foreach($this->dates as $date => $amount){
		$i++;
		if($i < $total){
			echo "['ST papers',".$date.",".$amount."],";
		}
		else{
			echo "['ST papers',".$date.",".$amount."]";
		}
	}
	
	if(count($this->datesdblp) > 0){
		foreach($this->datesdblp as $date => $amount){
			print ",['DBLP papers',".$date.",".$amount."]";
		}
	}
?>
	]);
	var chart = new google.visualization.MotionChart(document.getElementById('chart_div'));
	
	var options = {};
	options['state'] =
	'{"xZoomedIn":false,"dimensions":{"iconDimensions":["dim0"]},"time":"1989","xZoomedDataMax":1262304000000,"nonSelectedAlpha":0.4,"uniColorForNonSelected":false,"orderedByY":false,"xLambda":1,"playDuration":15000,"colorOption":"2","yZoomedDataMax":17,"orderedByX":false,"iconKeySettings":[],"showTrails":true,"iconType":"BUBBLE","yZoomedDataMin":1,"yZoomedIn":false,"xZoomedDataMin":599616000000,"xAxisOption":"_TIME","sizeOption":"2","yAxisOption":"2","yLambda":1,"duration":{"multiplier":1,"timeUnit":"D"}}';

	options['showSelectListComponent'] = false;
	options['showSidePanel'] = true;
	options['showXMetricPicker'] = false;
	options['showYMetricPicker'] = false;
	options['showXScalePicker'] = false;
	options['showYScalePicker'] = false;
	options['showAdvancedPanel'] = false;
	
	options['width'] = 650;
	options['height'] = 350;

	
	chart.draw(data, options);
  }
</script>
<div id="chart_div" style="width: 550px; height: 400px;"></div>
  